<script setup>
    import { useRouter } from 'vue-router';
    let router = useRouter();
    function gotoMain(){
      ///路由跳转
      router.push("/main")
    }
</script>

<template>
  <div>
    <h1>登录页面</h1>
    <router-link to="/register">如果没有账号，请先注册</router-link>
    <button @click="gotoMain">跳转到主页</button>
  </div>
</template>

<style scoped>

</style>